import {
    getCategoryList
} from "../../api/category";
const state = {
    categoryList: [],
}
const mutations = {
    setCategoryList(store, data) {
        store.categoryList = data
    },
}
const actions = {
    async getCategoryList(store, data) {
        store.commit('setCategoryList', await getCategoryList(data))
    },
}

export default {
    namespaced: true,
    state,
    mutations,
    actions,
}